﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace SSharp.Core.Evaluator {
	/// <summary>
	/// Represents a simple evaluation result. if result.GetType() == typeof(EvalutationResult), the Result contains the resulting value from the evaluation.
	/// </summary>
	public class EvaluationResult {
		public readonly object Result;

		internal EvaluationResult(object result) {
			this.Result = result;
		}
	}

	/// <summary>
	/// Extends EvaluationResult to signify that another round of evaluation is needed. Result will contain the expression to be evaluated, and the Environment will contain the environment needed for evaluation.
	/// </summary>
	public class MoreEvaluationNeeded : EvaluationResult {
		public readonly IEnvironment Environment;

		internal MoreEvaluationNeeded(object expression, IEnvironment env)
			: base(expression) {
			Environment = env;
		}
	}
}
